home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 038a / remfax.zip / MVRFAX.BAT < prev    next >
DOS Batch File  |  1993-02-15  |  3KB  |  109 lines

  1. @echo off
  2. cls
  3.  
  4. rem --- check first parameter
  5. if %1x==/?x goto HELP
  6. if %1x==?x goto HELP
  7.  
  8. goto START
  9.  
  10. CONFIG VARIABLES:
  11. These environment variables have to be set up for MVRFAX to work. To avoid
  12. destrying of already existing variables they all begin with the prefix MV_.
  13.  
  14. MV_PORT .................... comm port (0=COM1, 1=COM2, ...)
  15. MV_ZFXDRV .................. drive where ZFAX/RCVFAX are located
  16. MV_ZFXDIR .................. directory where ZFAX/RCVFAX are located 
  17.                              and faxes are stored                            
  18. MV_DRV ..................... drive where MVRFAX is located
  19. MV_DIR ..................... directory where MVRFAX is located
  20. MV_FSTART .................. command to load/start FOSSIL driver
  21. MV_FSTOP ................... command to remove/stop FOSSIL driver
  22. MV_DIALOUT ................. dial prefix (blanked by _MVRFAX.BAT for local
  23.                              calls)
  24. MV_BEEPLEN ................. length of beep (in .1 secs)
  25. MV_FAXRING ................. number of rings, if NO new fax available
  26. MV_PWD ..................... password (max. 10 digits, separated by spaces)
  27. MV_PWRON ................... .BAT command to turn power on (e.g. hard disk)
  28. MV_PWROFF .................. .BAT command to turn power off (e.g. hard disk)
  29.  
  30. :START
  31.  
  32. rem --- Set up configuration
  33. set MV_PORT=0
  34. set MV_ZFXDRV=C:
  35. set MV_ZFXDIR=\ZYXEL\ZFAX
  36. set MV_DRV=C:
  37. set MV_DIR=\MVRFAX
  38. set MV_FSTART=BNU /T:16384 /R:16384 /L%PORT%:19200 /M-
  39. set MV_FSTOP=BNU /U
  40. set MV_DIALOUT=
  41. set MV_BEEPLEN=5
  42. set MV_FAXRING=1
  43. set MV_PWD=1 2 3
  44. set MV_PWRON=
  45. set MV_PWROFF=
  46.  
  47. rem --- Work variables
  48. set MV_NEWNR=Y
  49. set MV_TELNR=_____________________
  50. set MV_FAXEXST=____
  51. set MV_PWDOK=Y
  52.  
  53. rem --- Fossil Init
  54. %MV_FSTART%
  55.  
  56. rem --- Do It
  57. rem     Parameter 1 = /L means last callback number (the one that TELPLAY.BAT stores)
  58. rem     Parameter 2 = /L means local call
  59. rem     Both parameters must be written in UPPERCASE
  60. %COMSPEC% /C _MVRFAX %MV_FAXRING% %1 %2
  61.  
  62. rem --- Hangup
  63. ZUTIL H /P%MV_PORT% 
  64.  
  65. rem --- Fossil De-Init
  66. %MV_FSTOP%
  67.  
  68. rem --- Clean up environment
  69. set MV_TELNR=
  70. set MV_FAXEXST=
  71. set MV_FAXRING=
  72. set MV_PWDOK=
  73. set MV_PORT=
  74. set MV_ZFXDRV=
  75. set MV_ZFXDIR=
  76. set MV_DRV=
  77. set MV_DIR=
  78. set MV_FSTART=
  79. set MV_FSTOP=
  80. set MV_DIALOUT=
  81. set MV_BEEPLEN=
  82. set MV_NEWNR=
  83. set MV_PWD=
  84. set MV_PWRON=
  85. set MV_PWROFF=
  86. goto BYE
  87.  
  88.  
  89. :HELP
  90. echo MVRFAX [/L] [/L]
  91. echo        MVRFAX allows control and retrieval of faxes from remote.
  92. echo        Parameter 1 = /L means use last callback number
  93. echo        Parameter 2 = /L means local call (no password needed)
  94. echo        Commands:
  95. echo        0 ... check for faxes
  96. echo        1 ... get callback number
  97. echo        2 ... set callback number
  98. echo        3 ... call back (deliver faxes)
  99. echo        4 ... delete old faxes
  100. echo        5 ... call external program EXTERN.BAT
  101. if not exist TELPLAY.BAT goto BYE
  102. call TELPLAY X
  103. echo        The last callback number is "%MV_TELNR%".
  104. set MV_TELNR=
  105.  
  106.  
  107. :BYE
  108. 
  109.